package cn.edu.wynu;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class BookAspect {

    @Before("execution(* cn.edu.wynu.BookHandler.*(..))")
    public void beforeAdvice() {
        System.out.println("********************");
        System.out.println("欢迎光临!");
    }

    @After("execution(* cn.edu.wynu.BookHandler.*(..))")
    public void afterAdvice() {
        System.out.println("欢迎下次光临!");
        System.out.println("********************");
    }
}
